﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PracticeCoverage.ascx.cs" Inherits="controls_PracticeCoverage" %>
<div  style="direction:rtl; height:500px; overflow: auto;">
    <div style="direction:ltr;" >    
        <table>
            <tr>
                <td>
                    <asp:Button ID="btnCoverage" runat="server" Text="Show Coverage" OnClick="ShowCoverage" CssClass="formButton" />
                    <br />
                    <br />
                    <asp:CheckBoxList ID="chlPractices" runat="server"
                        DataSourceID="Practices" DataTextField="Name" 
                        DataValueField="PracticeID">
                    </asp:CheckBoxList>
                </td>
                
                <td valign="top">
                    <asp:GridView ID="grdPrinciplesCoverage" runat="server"
                        AutoGenerateColumns="False" DataSourceID="Principles" >
                        <Columns>            
                            <asp:TemplateField HeaderText="Agile Principles" SortExpression="Name">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Description") %>'></asp:Label>
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Main/images/green-tick.png" Visible='<%# IsPrincipleCovered((decimal)Eval("ID")) %>' />
                                </ItemTemplate>                    
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                 </td>
                 <td valign="top">
                    <asp:GridView ID="grdValuesCoverage" runat="server" AutoGenerateColumns="False" 
                        DataSourceID="Values">
                        <Columns>
                            <asp:TemplateField HeaderText="Agile Values" SortExpression="Name">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Description") %>'></asp:Label>
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Main/images/green-tick.png" Visible='<%# IsValueCovered((decimal)Eval("ID")) %>' />
                                </ItemTemplate>                    
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
                <td valign="top">
                    <asp:GridView ID="grdActivitiesCoverage" runat="server" 
                        AutoGenerateColumns="False" DataSourceID="Activities">
                        <Columns>
                            <asp:TemplateField HeaderText="Activities" SortExpression="Name">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Main/images/green-tick.png" Visible='<%# IsActivityCovered((decimal)Eval("ID")) %>' />
                                </ItemTemplate>                    
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
                <td valign="top">
                    <asp:GridView ID="grdDisciplinesCoverage" runat="server"
                        AutoGenerateColumns="False" DataSourceID="Disciplines">
                        <Columns>
                            <asp:TemplateField HeaderText="Disciplines" SortExpression="Name">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Main/images/green-tick.png" Visible='<%# IsDisciplineCovered((decimal)Eval("ID")) %>' />
                                </ItemTemplate>                    
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
</div>
<asp:EntityDataSource ID="Practices" runat="server" 
            ConnectionString="name=ProjectStorageEntities" 
            DefaultContainerName="ProjectStorageEntities" EnableFlattening="False" 
            EntitySetName="AgilePractices">
</asp:EntityDataSource>
<asp:EntityDataSource ID="Principles" runat="server" 
            ConnectionString="name=ProjectStorageEntities" 
            DefaultContainerName="ProjectStorageEntities" EnableFlattening="False" 
            EntitySetName="AgilePrinciples">
</asp:EntityDataSource>
 <asp:EntityDataSource ID="Values" runat="server" 
            ConnectionString="name=ProjectStorageEntities" 
            DefaultContainerName="ProjectStorageEntities" EnableFlattening="False" 
            EntitySetName="AgileValues">
 </asp:EntityDataSource>
 <asp:EntityDataSource ID="Activities" runat="server" 
            ConnectionString="name=ProjectStorageEntities" 
            DefaultContainerName="ProjectStorageEntities" EnableFlattening="False" 
            EntitySetName="ProcessActivities">
</asp:EntityDataSource>
<asp:EntityDataSource ID="Disciplines" runat="server" 
            ConnectionString="name=ProjectStorageEntities" 
            DefaultContainerName="ProjectStorageEntities" EnableFlattening="False" 
            EntitySetName="ProcessDisciplines">
</asp:EntityDataSource>
